package com.jia.together.controller.front;

import com.jia.together.entity.CourseType;
import com.jia.together.service.CourseTypeService;
import com.jia.together.utils.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/front/courseType")
//@CrossOrigin
public class CourseTypeFrontController {

    @Autowired
    private CourseTypeService courseTypeService;

    @GetMapping("/getCourseList")
    public R getCourseList() {
        List<CourseType> list = courseTypeService.selectCourseList();
        return R.ok().data("data",list);
    }

}
